vcStatement

Basic implementation for statements in a process routine.

See in: Overview

Module: vcExecutor

Parent: vcObject

Children: vcScopeStatement, vcViewStatement, vcAppendToListStatement, vcAttachProductStatement, vcBufferProductsStatement, vcChangeProductTypeStatement, ... (see more)
vcScopeStatement
vcViewStatement
vcAppendToListStatement
vcAttachProductStatement
vcBufferProductsStatement
vcChangeProductTypeStatement
vcCheckAssemblyStatement
vcConstructStatement
vcCreateProductStatement
vcDetachProductStatement
vcFindFlowStepStatement
vcGetAssemblyStatement
vcGetAssemblyStepPropertyStatement
vcGetFlowStepStatement
vcGetProductsStatement
vcGetPropertyStatement
vcMoveJointStatement
vcProcessBreakStatement
vcProcessCommentStatement
vcProcessContinueStatement
vcProcessDelayStatement
vcProcessHaltStatement
vcProcessIfStatement
vcProcessPrintStatement
vcProcessSetPropertyStatement
vcProcessSwitchCaseStatement
vcProcessWhileStatement
vcPythonStatement
vcReleaseProductReservationStatement
vcRemoveProductStatement
vcRequirementStatement
vcRunRobotRoutineStatement
vcSelectProductsStatement
vcSendSignalStatement
vcSetNextFlowStepStatement
vcSetNodeMaterialStatement
vcSetNodeVisibilityStatement
vcSetProductVisitStateStatement
vcSetStatisticsFlowStatement
vcSetStatisticsStateStatement
vcTransportPatternInStatement
vcTransportStatementBase
vcWaitPropertyConditionStatement
vcWaitSignalStatement
vcWaitTransportStatement
vcWorkStatement
vcBreakStatement
vcCallRoutineStatement
vcCommentStatement
vcContinueStatement
vcDelayStatement
vcHaltStatement
vcIfStatement
vcPositionStatement
vcPrintStatement
vcProgramSyncStatement
vcReturnStatement
vcSetBaseStatement
vcSetDigitalOutputStatement
vcSetPropertyStatement
vcSetRobotStatisticsStateStatement
vcSetToolStatement
vcSwitchCaseStatement
vcWaitDigitalInputStatement

Referenced by: vcCore.getStatement(), vcProcessContext.createStatement(), vcProcessExecutor.CurrentStatement, vcRobotExecutor.CurrentStatement, ... (see more)
vcCore.getStatement()
vcProcessContext.createStatement()
vcProcessExecutor.CurrentStatement
vcRobotExecutor.CurrentStatement
vcScope.ParentStatement
vcScope.Statements
vcScope.createStatement()
vcStatementHelper.GetActiveStatement()

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
ExecutedCycleTimeRealRWGets or sets the statement executed cycle time
IndexIntegerRGets the statement index within parent routine
IsEnabledBooleanRWGets or sets a value which determines if the statement is activated or deactivated.
NameStringRWGets or sets the name of the statement.
ParentRoutinevcRoutineRGets the routine of the statement.
ParentScopevcScopeRGets the scope of the statement.
PropertiesvcPropertyContainerRGets the properties of this statement.
ScopesvcList[vcScope]RGets sub-scopes of statement
TypeobjectRGets the statement's type.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
deleteNoneNoneDeletes a given statement in the scope.

Example: Access Process Statements

"""Read the process statements of a routine in Process Editor found via process executor behavior."""
import vcCore as vc

comp = vc.getComponent()
exec = comp.findBehavior("ProcessExecutor") # vcProcessExecutor

routine = exec.Processes[0] # vcRoutine that inherits from vcScope
print (routine.Statements) # access the statements of the routine

Example: Create New Process Statement

""" Creates a new process statement and sets the property values."""

import vcCore as vc
import vcExecutor as vc_ex

comp = vc.getComponent()
exec = comp.findBehavior("ProcessExecutor") # vcProcessExecutor

routine = exec.Processes[0] # vcRoutine that inherits from vcScope
new_statement = routine.createStatement(vc_ex.vcStatementType.PROCESS_SET_PROPERTY) # createStatement from vcScope
new_statement.TargetProperty = "x"
new_statement.ValueExpression.Value = "y" # set the value of vcExpressionProperty

Example: Delete Process Statement

""" Deletes a process statement."""

import vcCore as vc

comp = vc.getComponent()
exec = comp.findBehavior("ProcessExecutor") # vcProcessExecutor

routine = exec.Processes[0] # vcRoutine that inherits from vcScope
statement = routine.Statements[0] # take the first statement of the routine
statement.delete()